<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script
  src="https://code.jquery.com/jquery-3.6.1.js"
  integrity="sha256-3zlB5s2uwoUzrXK3BT7AX3FyvojsraNFxCc2vC/7pNI="
  crossorigin="anonymous"></script>
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: pink;   
            display: none;
           }
    </style>
</head>
<body>
     <button>下拉</button>
     <button>上拉</button>
     <button>下拉上拉</button>
     <div></div>
     <script>
        $(function(){
            $("button").eq(0).click(function(){
                $("div").slideDown(2000)
            })
            $("button").eq(1).click(function(){
                $("div").slideUp(2000)
            })
            $("button").eq(2).click(function(){
                $("div").slideToggle(2000)
            })
         
        })
     </script>
</body>
</html>